----- fifo status bits based on first and last pointers---------------
if fifo_temp.last = fifo_temp.first then
		if fifo_temp.status.level = 0 then
			fifo_temp.status.empty := '1';
		else
			fifo_temp.status.full := '1';
		end if;
	elsif fifo_temp.first - fifo_temp.last >= 2 then
		fifo_temp.status.almost_full := '1';
	else
		fifo_temp.status.full := '0';
		fifo_temp.status.empty := '0'
		fifo_temp.status.almost_full := '0';
	end if;
------------------------------------------------------------------	